package com.wcs.exam.controller.auth.resp;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * Auth-考试-响应对象
 * </p>
 *
 * @author wcs
 * @since 2024-07-10
 */
@Getter
@Setter
@Accessors(chain = true)
@Schema(description = "Auth-考试-考试结束-响应对象")
public class AuthExamEndResp implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "用户考试记录ID")
    private Long recordId;

    @Schema(description = "评阅方式(1:系统评阅，2:人工评阅)")
    private Integer evaluationMethod;

    @Schema(description = "试卷总分")
    private BigDecimal totalScore;

    @Schema(description = "用户得分")
    private BigDecimal userScore;

    @Schema(description = "考试用时(单位：秒)")
    private Integer userAnswerTime;

    @Schema(description = "历史最高分")
    private BigDecimal historyHighestScore;

    @Schema(description = "主观题得分")
    private BigDecimal subjectiveQuestionScore;

    @Schema(description = "客观题得分")
    private BigDecimal objectiveQuestionScore;

    @Schema(description = "正确题数")
    private Integer questionCorrectCount;

    @Schema(description = "错误题数")
    private Integer questionErrorCount;

    @Schema(description = "合格状态(1:未知、2:合格、3:不及格)")
    private Integer passStatus;

    @Schema(description = "成绩显示(false：禁止、true：显示)")
    private Boolean resultShow;

    @Schema(description = "成绩展示规则(1：交卷后、2：考试结束后、3：自定义)-只能查看评阅完成的记录")
    private Integer resultShowRule;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Schema(description = "成绩展示时间")
    private LocalDateTime resultShowTime;

    @Schema(description = "作答内容展示(false：禁止、true：显示)-开启成绩显示才能开启")
    private Boolean answerShow;

    @Schema(description = "作答内容展示规则(1：查看对错和答案解析、2：只看对错)-只能查看评阅完成的记录")
    private Integer answerShowRule;

    @Schema(description = "结果显示名次(false：禁止、true：显示)-开启成绩显示才能开启")
    private Boolean resultShowRank;

    @Schema(description = "排行榜(false：禁止、true：显示)")
    private Boolean rankList;

    @Schema(description = "正式考试:名次排行")
    private Integer rankNo;

    @Schema(description = "是否能继续考试")
    private Boolean startExam;

    @Schema(description = "剩余考试次数，-1：表示无限次")
    private Long residueExamCount;
}
